#include <sched.h>
#include <stdio.h>

void print_priority(int policy, const char* str)
{
  int min, max;
  min = sched_get_priority_min(policy);
  max = sched_get_priority_max(policy);
  
  printf("%s min priority: %d\n",str,min);
  printf("%s max priority: %d\n",str,max);
}
int main()
{
  print_priority(SCHED_OTHER,"SCHED_OTHER");
  print_priority(SCHED_RR,"SCHED_RR");
  print_priority(SCHED_FIFO,"SCHED_FIFO");
  print_priority(SCHED_BATCH,"SCHED_BATCH");
  print_priority(SCHED_IDLE,"SCHED_IDLE");
  return 0;
}
